<?php

class ArticleTable extends Doctrine_Table
{
    public function getArticles() {
	 // TODO - with votes, ordered and filtered 
	return $this->getArticlesQuery()->execute();
    }

    public function getArticlesQuery() {
	 // TODO - with votes, ordered and filtered
	$q = $this->createQuery('a');
	return $q;
    }

    public function getArticle($id) {
	$q = $this->createQuery('a')
		->where('a.id=?', $id);
	return $q->fetchOne();
    }


}
